package com.dkm.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.dkm.entity.SongList;

import io.lettuce.core.dynamic.annotation.Param;

public interface SongListRepository extends JpaRepository<SongList, Integer>,JpaSpecificationExecutor<SongList> {

	/**
	 * 根据用户id获取歌曲
	 * @param user_id
	 * @return
	 */
	@Query(value = "select * from song_list where user_id=:user_id",nativeQuery=true)
	List<SongList> getSongsByUser_id(@Param("user_id") String user_id);
}
